{include file="common/_header"}
{include file="common/_header1"}

<body class="layui-anim layui-anim-up">
<div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">售后管理</a>
            <a>
              <cite>商品售后列表</cite></a>
          </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>

<div class="x-body">

<!--    <xblock>-->
<!--        &lt;!&ndash;            <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>&ndash;&gt;-->
<!--        <button class="layui-btn" onclick="x_admin_show('添加商品','/products/boxeproduct?product_id=0',800,600)"><i class="layui-icon"></i>  添 加</button>-->
<!--        &lt;!&ndash;            <span class="x-right" style="line-height:40px">共有数据：88 条</span>&ndash;&gt;-->
<!--    </xblock>-->

    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <div class="layui-input-inline">
                {if $data.isdisplay}
                <div class="layui-unselect layui-form-select shop_id" style="display:inline-block;">
                    <input type="text" name="shop_name"  placeholder="请输入商铺名称" value="{$data.get['shop_name']}" autocomplete="off" class="layui-input">
                </div>
                {/if}
                <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
            </div>

        </form>
    </div>



    <table id="tables" class="layui-table">
        <thead>
        <tr>
            {if $data.isdisplay}
            <th>商铺名称</th>
            {/if}
            <th>用户信息</th>
            <th>订单信息</th>
            <th>商品规格名称</th>
            <th>商品图片</th>
            <th>申请售后原因</th>
            <th style="min-width:200px;">上传凭证</th>
            <th>时间</th>
            <th>处理状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="data.data" id="vo"}
        <tr class="table_tr">
            {if $data.isdisplay}
            <td>{$vo.shop_name}</td>
            {/if}
            <td>
                微信昵称：{$vo.nick_name}<br>
                收货人姓名：{$vo.name}<br>
                联系手机号：{$vo.phone}
            </td>
            <td>
                订单号：{$vo.order_product_details.orderno}<br>
                购买数量：{$vo.order_product_details.quantity}<br>
                原价：{$vo.order_product_details.price}<br>
                销售价格：{$vo.order_product_details.sale_price}<br>
                总价：{$vo.order_product_details.amount}
            </td>
            <td>
                商品名称：{$vo.order_product_details.product_name}<br>
                规格属性：{$vo.order_product_details.p_s_name}<br>
            </td>
            <td><img src="/{$vo.imagesurl}"></td>
            <td>{$vo.content}</td>
            <td>
                {if !empty($vo.images)}
                {volist name="vo.images" key="k" id="v"}
                <a data-magnify="gallery" href="/{$v}">查看图片</a><br>
                {/volist}
                {/if}
            </td>
            <td>
                下单时间：{$vo.order_product_details.order_time|date="Y-m-d H:i:s"}<br>
                支付时间：{$vo.order_product_details.pay_time|date="Y-m-d H:i:s"}<br>
                申请售后时间：{$vo.as_time|date="Y-m-d H:i:s"}<br>
            </td>
            <td>{if $vo.state == 1}售后处理中{else}已退款{/if}</td>
            <td>
            <ul class="nav navbar-nav" style=" height: 30px; line-height: 10px;">
                <li class="dropdown" style="height: 100%;">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" style=" height: 100%; line-height: 5px;">
                        操作
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        {if $vo.state == 1}
                        <li><a title="已退款" onclick="OperateStop('aftersalesorder?order_id={$vo.order_product_details.order_id}')" href="javascript:;">退款</a></li>
                        {/if}
                    </ul>
                </li>
            </ul>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page_all">
        {$page|raw}
    </div>
</div>
<script>
    // 图片预览插件
    $('[data-magnify]').magnify({
        title: false, // 显示标题
        resizable: false,
        // 开启全屏
        initMaximized: true,
        headerToolbar: [
            'close'
        ],
    });
</script>
</body>

{include file="common/_bottom"}